/**
  Header Component
*/
.k-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10;
  height: 50px;
  width: 100%;
  margin-bottom: 20px;
  color: var(--tipColor);
  user-select: none;
  animation: slideInDown .3s ease-in .2s forwards;
  // border-bottom: 1px solid var(--lightBg);
  .header-content {
    width: 100%;
    height: 50px;
    padding: 0 20px;
    z-index: 11;
    background-color: var(--white);
    box-shadow: 0 2px 5px rgb(0 0 0 / 0.1);
    .header-l-nav {
      height: 100%;
      .logo {
        background-image: url("~~@/static/images/logo.svg");
        background-size: 30px;
        background-position: 15px, 0;
        background-repeat: no-repeat;
        display: inline-block;
        width: 60px;
        height: 100%;
        cursor: pointer;
        color: transparent;
      }
      .k-play {
        width: 60px;
        height: 100%;
        .iconfont {
          font-size: 22px;
          padding: 10px;
          cursor: pointer;
        }
      }
    }
  }
  .k-title {
    opacity: 0;
    visibility: hidden;
    transition: all .5s ease-in-out;
    transform: translateY(20px);
    width: calc(100% - 240px);
    height: 100%;
    line-height: 50px;
    text-align: center;
    &.active {
      opacity: 1;
      visibility: visible;
      transform: translateY(0);
    }
  }
  // 右侧菜单项
  .header-r-nav,
  .r-nav-item,
  .link {
    height: 100%;
    .avatar {
      height: 80%;
      border-radius: 50%;
      border: 1px solid var(--lightBg);
    }
  }
  .r-nav-item {
    position: relative;
    margin-left: 10px;
    cursor: pointer;
    width: 50px;
    height: 100%;
    .icon-menu {
      font-size: 25px;
      color: var(--tipColor);
    }
    &:hover .icon-menu {
      color: var(--lightTxt);
    }
    &:hover .drop-down {
      opacity: 1;
      top: 55px;
    }
    .drop-down {
      position: absolute;
      left: -25px;
      top: -350%;
      z-index: 9;
      opacity: 0;
      width: 100px;
      height: 150px;
      background-color: var(--white);
      box-shadow: 0 0 10px 2px rgb(0 0 0 / 30%);
      border-radius: 5px;
      transition: opacity .5s ease;
      justify-content: space-around;
      &::before,
      &::after {
        content: "";
        position: absolute;
        left: 50%;
        top: -30px;
        transform: translateX(-50%);
        width: 0;
        height: 0;
        border: 15px solid transparent;
        border-bottom-color: var(--border);
      }
      &::after {
        border-bottom-color: var(--white);
        top: -28px;
      }
      .nav-item {
        color: var(--lightInk);
        &:hover {
          color: var(--primary);
        }
      }
      // .qrcode {
      //   width: 100%;
      //   height: 100%;
      //   transform: scale(0.6);
      // }
      // .tip {
      //   position: absolute;
      //   transform: scale(0.8);
      //   white-space: nowrap;
      //   bottom: -20px;
      // }
    }
  }
  .view-progress {
    position: absolute;
    top: 0;
    left: 0;
    background-color: var(--dark-primary);
    height: 2px;
    width: 0;
    z-index: 20;
    transition: width .5s;
  }
  .music-progress {
    position: absolute;
    bottom: -2px;
    left: 0;
    background-color: var(--error);
    height: 2px;
    width: 0;
  }
}

@keyframes slideInDown {
  0% {
    transform: translateY(-50px);
  }
  100% {
    transform: translateY(0);
  }
}
